List of JavaScript methods

These methods are supported using JavaScript syntax.

Calling another procedure

In JavaScript procedures you can also call another JavaScript procedure just by including the procedure name. This also enables XpertRule @command syntax procedures to be invoked (i.e. called from the JavaScript syntax procedure). This is a useful way to utilise the more specialist XpertRule @commands that are not supported by the JavaScript syntax.

Calling an XpertRule procedure and an XpertRule function from a JavaScript procedure...
xpertrule.message('Message1','Sample','OK');
#xrProcedure.run();
xpertrule.message('Message3 ' + #xrFunction.run('Fred'),'Sample','OK');
XpertRule procedure 'xrProcedure'...
@Alert 'Message2','Sample','OK'
XpertRule function 'xrFunction'...
FUNCTION (param1:S):S
@SelectCase param1
  @Case 'John'
    @Return 'Manchester'
  @Case 'Fred'
    @Return 'London'
@EndSelect

xpertrule.decodeData

Syntax: xpertrule.decodeData(<Message string>);

xpertrule.encodeData

Syntax: xpertrule.encodeData([#object1, #object2], <include captured objects>, "XML"|"JSON");

xpertrule.findObject

Syntax: xpertrule.findObject(<object name>)

xpertrule.getValuesToObject

Syntax: xpertrule.getValuesToObject([<object id array>])

xpertrule.lineOfReasoning

Syntax: xpertrule.lineOfReasoning()

xpertrule.message

Syntax: xpertrule.message(<contents>[,<title>]);

xpertrule.pause

Syntax: xpertrule.pause(<passed string data>);

xpertrule.phone

Syntax: xpertrule.phone(<method>,<param array of strings>);

xpertrule.phoneFeature

Syntax: xpertrule.phoneFeature(<method>);

xpertrule.setValuesWithObject

Syntax: xpertrule.setValuesWithObject(<xpertrule format javascript object>);

xpertrule.urlFetch

Syntax: xpertrule.urlFetch(<url>[,<post data string>])

hierarchy.clear

Syntax: hierarchy.clear();

hierarchy.toString

Syntax: hierarchy.toString();